package com.ruoyi.config;

import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlusConfig {


    /** mybatis 3.4.1 pagination config start ***/
//    @Bean
//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
//        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
//        interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
//        return interceptor;
//    }

//    @Bean
//    public ConfigurationCustomizer configurationCustomizer() {
//        return configuration -> configuration.setUseDeprecatedExecutor(false);
//    }

//    @Bean
//    public PaginationInnerInterceptor paginationInterceptor() {
////        return new PaginationInterceptor();
//        PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
//        //TODO: mybatis-plus do not support TDengine, use postgresql Dialect
//        paginationInterceptor.se("postgresql");
//
//        return paginationInterceptor;
//    }

}
